<html lang="zh" xmlns:th="http://www.w3.org/1999/html"><!--<![endif]-->
<head>
    <meta charset="utf-8">
    <title>确认订单</title>
    <meta name="keywords" content="闪送，同城速递，专人直送，同城急件，代买，代送，代购，同城加急，同城快递，限时送达，最快的快递">
    <meta name="renderer" content="webkit">
    <meta name="description" content="闪送是国内最快的同城速递服务公司，专人直送，60分钟送达全城！24小时在线为用户提供同城急件,蛋糕,鲜花,生鲜,水果等限时递送服务。">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="shortcut icon" href="img/favicon.ico">
    <link th:href="@{/css/font-awesome.min.css}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/font-awesome-ie7.min.css}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/style-metronic.css?v=201509161736}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/style.css?v=2016120801}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/style-responsive.css}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/themes/blue.css?v=2016120801}" rel="stylesheet" type="text/css" id="style_color">
    <link th:href="@{/css/daterangepicker.css?v=20150503203601}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/jquery.fancybox.css}" rel="stylesheet">
    <link th:href="@{/css/jquery.raty.css}" rel="stylesheet">
    <link th:href="@{/css/pagination.css}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/order_base.css?v=20161019001}" rel="stylesheet" type="text/css" id="style_color">
    <link th:href="@{/css/timepicker.css}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/jquery.fancybox.css}" rel="stylesheet">
    <link th:href="@{/css/uniform.default.css}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/custom.css?v=20161209192433}" rel="stylesheet" type="text/css" id="style_color">
    <link th:href="@{/css/autocomplete.css}" rel="stylesheet" type="text/css">
    <!-- confirmaddress.jsp style -->
    <link th:href="@{/css/confirmaddress.css}" rel="stylesheet" type="text/css" id="style_color">
    <link th:href="@{/css/iss.css?v=201607182014}" rel="stylesheet" type="text/css">

    <link th:href="@{/css/modules.css?v=2016120801}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/common.css?v=20170316184648}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/index.css?v=20170316184648}" rel="stylesheet" type="text/css"/>
    <script th:src="@{/js/jquery-3.5.1.js}"></script>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <script th:src="@{/layer/layer.js}"></script>

    <style type="text/css">.dropdown-submenu:hover > .dropdown-menu {
        display: none
    }</style>
    <style type="text/css">.dropdown-submenu:hover > .dropdown-menu {
        display: none
    }</style>
    <style type="text/css">.dropdown-submenu:hover > .dropdown-menu {
        display: none
    }</style>
    <script>
        function total() {
            $("#must_pay").text(($("#discount").find("option:selected").data("id") * parseFloat($("#total_money").text())).toFixed(2))
            $("#used_coupon").text(($("#total_money").text() - $("#must_pay").text()).toFixed(2))
        }

        $(function () {
            $("#discount").change(function () {
                total();
            })
            total();
            $("#final-submit-order").click(function () {
                //{orderId}/{discountId}/{payType}
                $.ajax({
                        url: "/order/confirm/"+$("#ooo").val()+"/"+$("#discount").find("option:selected").val()+"/"+$("[name='payType']:checked").val(),
                        type: "POST",
                        dataType: "json",
                        success:function (result) {
                            if(result.code==806){
                                layer.open({
                                    type: 3,
                                    content:"<div>"+result.data+"</div>"
                                })
                            }else if(result.code==803){
                                layer.alert("您的余额不足，请先充值！");
                            }
                            else if(result.code==802){
                                layer.msg("您的预约单下单成功！",{icon:5})
                                location.href="/order/list";
                            }
                            else if(result.code==200){
                                layer.msg("即时单下单成功！",{icon:5});
                                location.href="/order/list";
                            }else if(result.code==804){
                                layer.alert("支付宝支付失败！")
                            }else if(result.code==805){
                                layer.alert("系统繁忙,请稍后再试！")
                            }
                            }
                    }

                )
            })
        })
    </script>
</head>
<body>


<!-- BEGIN HEADER -->
<div class="hContent headerInfo">
    <header th:replace="~{commons::#top}"/>
</div>
<div class="js_pop pop_window" style="display: none">
    <span class="closePopIcon js_pop_cancel"></span>
    <div class="title js_pop_tit"></div>
    <div class="btns">
        <button class="js_pop_btn btn blue"></button>
    </div>
</div>
<div class="bottom_bar"></div>
<div class="page-container" id="container_wrapper">


    <!-- BEGIN PAGE LEVEL PLUGIN STYLES -->
    <link th:href="@{/css/custom.css}" rel="stylesheet" type="text/css" id="style_color">
    <link th:href="@{/css/createorder.css?v=201507131168}" rel="stylesheet" type="text/css">
    <div class="info-order-wrap confirm-wrap" id="#place_order" data-toggle="nav_activate">
        <div class="info-order">
            <div class="info">
                <div class="confirm-tit">确认订单信息 &nbsp;&nbsp;&nbsp;
                </div>

                    <input id="showCoupon" name="showCoupon" value="true" type="hidden">
                    <input id="orderNumber" name="orderNumber" value="DH2017031710027856" type="hidden">
                    <input id="bindUser" name="bindUser" value="18005151538" type="hidden">
                    <input id="root_url" name="root_url" value="" type="hidden">
                    <input id="token" name="token" value="OGVLTm1rV0lvd0hpSHEwc0s4R3kyY1c4MTQ4OTcxODQ1MzUwNTM="
                           type="hidden">
                    <input id="dymatic_pwd" name="dymatic_pwd" class="required" value="12345#" type="hidden">
                    <input id="total" name="total" value="178600" type="hidden">
                    <input id="couponAmount" name="couponAmount" value="0" type="hidden">
                    <input id="couponValue" name="couponValue" value="" type="hidden">
                    <input id="couponType" name="couponType" value="" type="hidden">
                    <input id="coupon" name="couponNumber" value="" type="hidden">
                    <input id="cityId" name="cityId" value="1101" type="hidden">
                    <input id="balance" name="balance" value="0" type="hidden">
                    <input id="mustPay" name="mustPay" value="178600" type="hidden">
                    <input id="nightFee" name="nightFee" value="0" type="hidden">
                    <input id="appointType" name="appointType" value="0" type="hidden">

                    <div class="panel-body info-list">


                        <div class="form-body">

                            <input type="hidden" th:value="${order.id}" id="ooo"/>
                            <h3>
								<span class="color-yellow" id="final_info">
                                    <th:block th:text="${order.distance}">886.6</th:block>公里 / <th:block
                                        th:text="${order.weight}">5</th:block>公斤</span>
                            </h3>
                            <table cellspacing="0" cellpadding="0" width="100%">
                                <tbody>
                                <tr>
                                    <th style="padding-top: 10px;width:110px;">寄件人信息：</th>
                                    <td>
                                        <div class="" th:text="${order.sendInfo}">
                                            张丽， 13851435552，南京大牌档远洋店（青年路）（慈云寺北里209号楼远洋未来汇购物中心2层(近慈云寺桥东北角)）2025
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <th style="padding-top: 10px;width:110px;">收件人信息：</th>
                                    <td>
                                        <div class="" th:text="${order.recInfo}">
                                            张丽， 13851435552，南京大牌档远洋店（青年路）（慈云寺北里209号楼远洋未来汇购物中心2层(近慈云寺桥东北角)）2025
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <th style="padding-top: 10px;width:110px;">取件时间：</th>
                                    <td>
                                        <div class="" th:text="${order.arrange eq '2'?'立即取件':order.arrangeTime}">
                                        </div>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>

                    <div class="info-list">
                            <div class="info-first">
                                <div class="form-body">
                                        <div class="layui-inline">
                                            <select id="discount">
                                                <option value="0" th:data-id="1">不使用优惠券</option>
                                                <option th:each="discount:${discounts}" th:text="${discount.name}"
                                                        th:value="${discount.id}" th:data-id="${discount.discount}"></option>
                                            </select>
                                        </div>
                                <span class="glyphicon color-blue"><strong>使用优惠券抵消部分金额</strong></span>
                            </div>
                            <span class="color-red" style="line-height: 25px;clear:both" id="coupon_info2"></span>
                        </div>
                        <div class="margin-bottom-10" style="clear:left;">
                        </div>
                    </div>
            </div>


            <div class="panel-body  info-list" style="margin-top:0;">
                <div class="form-body">
                    <div>
                        <p>
                            <!-- <strong>付款信息</strong> -->
                            <!-- <br/><br/> -->

                        </p>
                        <div class="info-last" style="margin-top:0;padding-top:5px;">
                            <div style="margin-bottom:8px;margin-top:3px;"><span class="t"
                                                                                 style="font-size:17px;">订单总额：</span>
                                <span class="range c"><strong id="total_money"
                                                              th:text="${order.totalMoney}">1786</strong>元</span>
                            </div>

                            <p><span class="t">优惠抵扣：</span>
                                <span class="c couponSpan"><strong id="used_coupon">0</strong>元</span>
                            </p>

                            <p><span class="t color-red" style="font-size:18px;font-weight:bold;">还需支付：</span>
                                <span class="c"><strong id="must_pay">1786</strong>元</span>
                            </p>
                        </div>

                        <div class="pay-div radio-list payType">
                            <p>
                                <strong class="color-blue">支付方式：</strong>
                            </p>
                        </div>
                        <div class="panel-body clearfix payType" id="payType">
                            <div class="form-body">
                                <div class="form-group">
                                    <div class="radio-list margin-left-20" style="padding-left:14px">
                                        <label class="radio-inline" id="toPay">
                                            <input name="payType" id="recvPay" value="1" type="radio">余额支付
                                        </label>

                                        <label class="radio-inline">
                                            <input name="payType" id="upopPay" value="2" checked="checked"
                                                   type="radio">支付宝
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <p></p>
                    </div>
                    <div class="clearfix"></div>
                    <div class="submit-box clearfix"> <!-- 等待确认 -->
                        <button id="final-submit-order" type="button" class="btn btn-big btn-radius blue" >确认无误,去支付</button>
                        <br>
                        <small class="color-grey margin-top-10">点击“提交订单”按钮，即表示您同意</small>
                        <a href="/userAgreement" target="_blank">《闪送服务•用户协议》</a>
                    </div>
                </div>
                <div class="clearfix"></div>

            </div>
        </div>
    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-body" style="margin-top:40px;">
                    <span style="font-size: 17px">您的订单金额超过<span style="color:red">200</span>元，是否提交该订单？</span>
                </div>
                <div class="modal-footer" style="margin-top: 20px">
                    <button type="button" class="btn btn-primary " data-dismiss="modal">
                        &nbsp;&nbsp;关&nbsp;闭&nbsp;&nbsp;
                    </button>
                    &nbsp;&nbsp;
                    <button type="button" class="btn btn-danger " id="submitOrder">提交订单</button>
                </div>
            </div>
        </div>
    </div>
</div>


<!-- BEGIN FOOTER -->
<footer th:replace="~{commons::#footer}"/>
<!-- END FOOTER -->